//引入二次封装的axios
import request from '@/utils/request'
//引入接口类型
import type { hospitalDetailData,hospitalWorkResponesData,hospitalDoctorList,hospitalDoctorResponseData } from './type'
//枚举接口
enum API {
    //根据医院code获取详细信息
    HOSPITALINFO_URL='/hosp/hospital/',
    //获取医院科室接口
    HOSPITALDEPARTMENT_URL='/hosp/hospital/department/',
    //获取医院挂号数据
    HOSPITALREGISTER_URL='/hosp/hospital/auth/getBookingScheduleRule/',
    //获取医生排班的数据
    HOSPITALDOCTOR_URL='/hosp/hospital/auth/findScheduleList/',
    //获取就诊人信息
    HOSPITALUSER_URL='/user/patient/auth/findAll',
    //获取医生信息
    HOSPITALDOC_URL = '/hosp/hospital/getSchedule/'
}
//根据医院code获取详细信息
export const reqHospitalInfo = (code:string)=>request.get<any,hospitalDetailData>(API.HOSPITALINFO_URL+code)
//获取医院科室的信息
export const reqHospitalDepartment = (hoscode:string)=>request.get<any,any>(API.HOSPITALDEPARTMENT_URL+hoscode)
//获取医院挂号的数据
export const reqHospitalRegister = (page:number,limit:number,hoscode:string,depcode:string)=>request.get<any,hospitalWorkResponesData>(API.HOSPITALREGISTER_URL+`${page}/${limit}/${hoscode}/${depcode}`)
//获取医院排班的数据
export const reqHospitalDoctor = (hoscode:string,depcode:string,workDate:string)=>request.get<any,hospitalDoctorList>(API.HOSPITALDOCTOR_URL+`${hoscode}/${depcode}/${workDate}`)
//获取就诊人信息
export const reqHospitalUser = ()=>request.get<any,any>(API.HOSPITALUSER_URL)
//获取医生信息
export const reqHospitalDocInfo = (scheduleId:string)=>request.get<any,hospitalDoctorResponseData>(API.HOSPITALDOC_URL+scheduleId)